function parseQueryString(queryString) {
	const params = {};
	const pairs = (queryString[0] === '?' ? queryString.substr(1) : queryString).split('&');
	for (let i = 0; i < pairs.length; i++) {
		const pair = pairs[i].split('=');
		const key = decodeURIComponent(pair[0]);
		const value = decodeURIComponent(pair[1] || '');
		params[key] = value;
	}
	return params;
}

export default parseQueryString